//UserMap.java  
//
//Copyright (C) 2008 Devon Mizelle  
//  
//This program is distributed in the hope that it will be useful,  
//but WITHOUT ANY WARRANTY; without even the implied warranty of  
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
//GNU General Public License for more details.  
//  
//You should have received a copy of the GNU General Public License  
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

package hermes;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 *
 * @author Devon Mizelle
 */
public class UserMap implements java.io.Serializable {
    private Map userMap = Collections.synchronizedMap(new HashMap<String, User>());
    
    public UserMap(){
        userMap.put("Hello", new User("Devon"));
    }
    public void put(String id, User user){
        Object put = userMap.put(id, user);
    }
    
    public User get(String id){
        return (User) userMap.get(id);
    }
            
    public boolean containsKey(String id){
        return userMap.containsKey(id);
    }
    
    public int getSize(){
        return userMap.size();
    }
    
    public Set<String> keySet(){
        return userMap.keySet();
    }
}
